
             
/**
 * 
 *
 * @File name:  GetTFaAllocateAction.java   根据主键查询【资产调拨信息:T_FA_ALLOCATE】
 * @Create on:  2011-11-15 21:23:593
 * @Author   :  谭翔
 *
 * @ChangeList
 * ---------------------------------------------------
 * Date         Editor              ChangeReasons
 *
 */
           
        
package com.boho.estates.usual.action;

            
import java.sql.Connection;
import java.util.*;

import com.boho.base.dao.DaoHelper;
import com.boho.estates.po.*;
import cn.boho.framework.actions.ActionImp;
import cn.boho.framework.context.ActionContext;
import cn.boho.framework.po.POUtils;
import cn.boho.framework.service.MessageService;
import cn.boho.framework.exception.UserOperationException;
import cn.boho.framework.utils.DateUtils;
import cn.boho.framework.po.DynaBeanMap;
import cn.boho.framework.po.ComboPager;
import cn.boho.framework.po.Pager;
            
        
import com.boho.estates.usual.dao.TFaAllocateDao;

public class GetTFaAllocateAction extends ActionImp {
	private Connection con=null;
	@Override
	protected void doException(ActionContext atx, Exception ex) {
		atx.setErrorContext("FSTI_COMMON_1004", MessageService.getMessage("FSTI_COMMON_1004"),"【资产调拨信息】", ex);
	}
	@Override
	protected int performExecute(ActionContext atx) throws Exception {
		Integer faAllocateNo = atx.getIntegerValue("FA_ALLOCATE_NO",-1);
		DynaBeanMap dbm = TFaAllocateDao.getTFaAllocateByPk(con,faAllocateNo);
		
		DaoHelper.setTDepartmentField(con, dbm, "_NAME", "ALLOCATE_OUT_DEPARTMENT");//替换u部门名称
		DaoHelper.setTDepartmentField(con, dbm, "_NAME", "ALLOCATE_IN_DEPARTMENT");//替换u部门名称
		DaoHelper.setTpersonField(con, dbm, "_NAME", "OUT_DEPARTMENT_MANAGER");//替换人员
		DaoHelper.setTpersonField(con, dbm, "_NAME", "OLD_WITH_MANANGER");//替换人员
		DaoHelper.setTpersonField(con, dbm, "_NAME", "IN_DEPARTMENT_MANAGER");//替换人员
		DaoHelper.setTpersonField(con, dbm, "_NAME", "NEW_WITH_MANANGER");//替换人员
		
		
		atx.setObjValue("T_FA_ALLOCATE", dbm);
		return 1;
	}
	@Override
	protected int verifyParameters(ActionContext atx) throws Exception {
		con = atx.getConection();
		return 1;
	}
}
